For Task 3, make a map of land use / land cover and watersheds for the big island of Hawaii.

Familiarize yourself with the data attributes (see link), and download the shapefile data for each. After reading the shapefile data into R, make finalized map(s) in which you:

  1. Clearly and professionally show the different land use / land cover types for all main Hawaiian islands, or for an island or region of your choosing
  2. Clearly and professionally show the different watersheds for all main Hawaiian islands, or for an island or region of your choosing

There is flexibility! You can decide:

  1. Do you want your maps to be static or interactive? What areas do you want to focus on?
  2. Do you want to show land use/landcover and watersheds in a single map or in separate maps?

Whatever you decide is great, just make sure that your final outputs are presented in a nice professional HTML that you’d be proud to share with someone so that they can see your awesome spatial code!

1. Load necessary packages.

library(tidyverse)
library(janitor)
library(kableExtra)
library(naniar)
library(skimr)
library(sf)
library(tmap)
library(paletteer)
library(lubridate)
library(here)

2. Read in the data: watersheds and land use/land cover for the Hawaiian Islands

watershed <- read_sf(dsn = here(".", "Watersheds"),
                 layer = "Watersheds") %>% 
              st_transform(crs = 6628)

lulc <- read_sf(dsn = here(".", "Land_Use_Land_Cover_LULC"),
                layer = "Land_Use_Land_Cover_LULC") %>% 
              st_transform(crs = 6628)

3. Create an interactive map of the watersheds and land use/land cover for the Big Island of Hawaii

ggplot(data = watershed) +
  geom_sf(color = "black", 
          size = 0.1) +
  geom_sf(data = lulc,
          aes(fill = landcover),
          alpha = 0.5,
          color = "NA",
          show.legend = FALSE) +
  theme_minimal()

hawaii_clip <- st_intersection(watershed, lulc)

hawaii_clip_tmap <- tm_basemap("Esri.WorldImagery") + # Put in a basemap
  tm_shape(hawaii_clip) +
  tm_fill("landcover", palette = c("orange", "purple", "yellow"), alpha = 0.5) +
  tm_borders("red") +
  tm_compass(north = 0) +
  tm_layout(
  "Land Use/Land Cover per Watershed",
  legend.title.size=1,
  legend.text.size = 0.6,
  legend.position = c("left","bottom"),
  legend.bg.color = "white",
  legend.bg.alpha = 1)

tmap_mode("view") # Sets it to interactive view

hawaii_clip_tmap